Element Layout Control
Introduction
This section will describe the following:
- Sizing Columns
How axes influence the element behavior and appearance. - Clustering Columns
How axes control column and cylinder clustering.
Besides the obvious, an axis can also control how elements drawn on its scale behave. These behavioral features are determined by the axis that shows element names or x values. For a vertical combo chart this would mean the x axis and y axis for horizontal combo.
Column and Cylinder Widths
- SpacingPercentage
Gets or sets a percentage (0 - 100) which indicates the spacing between columns, cylinders or groups thereof. - StaticColumnWidth
Gets or sets the static bar width in pixels.
Example: This code specifies the column or cylinder widths for a ChartType.Combo chart.
[C#]Chart.XAxis.SpacingPercentage = 30; // Default is 16
// When this property is set, it takes precedence over spacing percentage.
Chart.XAxis.StaticColumnWidth = 20;
[Visual Basic]Chart.XAxis.SpacingPercentage = 30 ' Default is 16
' When this property is set, it takes precedence over spacing percentage.
Chart.XAxis.StaticColumnWidth = 20
Tip: The column width control also defines the tool tip hotspot width of area line series types. |
Clustering Columns / Cylinders
This feature enables columns in 3D modes to cluster (draw side by side) or not (draw one in front of the other). The default behavior is to cluster and column must be clustered in 2D mode.
[C#]Chart.Use3D = true;
Chart.XAxis.ClusterColumns = false;
[Visual Basic]Chart.Use3D = True
Chart.XAxis.ClusterColumns = False
Other options include
- Position
The axis positions when 2 or more axes are drawn on the same side of a ChartArea. - ReverseSeriesPositions
Indicates whether the positions of series bound to this axis are reversed without reversing legend positions. - ReverseSeries
Indicates whether the positions of series bound to this axis are reversed. - ReverseStack
Indicates whether the order of stacked elements is reversed.